#version 330 core

in vec2 a_Position;
out vec4 FragColor;

uniform vec2 cursor;
uniform vec4 color;
uniform bool click;

void main() {
    if (click)
        FragColor = color;
    else
        FragColor = vec4(vec3(1.0, 1.0, 1.0) - color.rgb, 1.0);
}